Public Class frmCalendar

    Friend dateSelected As DateTime

    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub

    Private Sub frmCalendar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub btnSelected_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelected.Click
        If DisplayConfirmation() Then Me.Close()
    End Sub

    Private Sub btnToday_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnToday.Click
        If DisplayConfirmation() Then Me.Close()
    End Sub

    Private Sub calWatchlistToday_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles calWatchlistToday.DateChanged
        dateSelected = e.Start
    End Sub

    Private Function DisplayConfirmation() As Boolean
        Select Case MessageBox.Show(CStr(dateSelected) & vbCrLf & "You sure?", "Confirmation", _
        MessageBoxButtons.YesNo, MessageBoxIcon.Question)
            Case Windows.Forms.DialogResult.Yes : Return True
            Case Windows.Forms.DialogResult.No : Return False
        End Select
    End Function
End Class